toDynamicPerimeterSp

fun Number.toDynamicPerimeterSp(qualifier: DpQualifier, fontScale: Boolean, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): ERROR CLASS: Symbol not found for TextUnit

EN Converts a Number (base value) into a dynamically scaled TextUnit (Sp) for Jetpack Compose.

Scaling logic:

  1. Builds a 64-bit packed cache key.

  2. If fontScale is true, the result respects the system font size setting.

  3. If fontScale is false (e.g. via .prsem), the system font scale is stripped.

  4. Checks DimenCache globally.

PT Converte um Number (valor base) em um TextUnit (Sp) dinamicamente escalado para Compose.

Lógica de escalonamento:

  1. Constrói uma chave de cache de 64 bits.

  2. Se fontScale for true, o resultado respeita a configuração de tamanho de fonte do sistema.

  3. Se fontScale for false (ex: via .prsem), a escala de fonte do sistema é removida.

  4. Consulta o DimenCache globalmente.

Return

Dynamically scaled TextUnit value.

Parameters

qualifier

Screen dimension qualifier.

fontScale

Whether to respect the user's system font scale.

inverter

Orientation-based dimension swap rule.

ignoreMultiWindows

If true, returns base value unscaled when in split-screen.

applyAspectRatio

If true, applies the aspect-ratio multiplier.

customSensitivityK

Custom AR sensitivity constant.